#ifndef __WIZ_BNF_ACTOR_OPERATORS_RANK_HPP__SHANHAOBO_19800429__
#define __WIZ_BNF_ACTOR_OPERATORS_RANK_HPP__SHANHAOBO_19800429__

#include "../../Base/WizBase.hpp"

namespace Wiz
{
    namespace BNF
    {
        namespace Actor
        {
            namespace Operators
            {
                namespace Rank
                {
                    template <typename T>
                    struct Type
                    {
                        static const ::Wiz::Int::Type v_Value = ::Wiz::Int::Max;
                    };

                    template <>
                    struct Type<::Wiz::Void::Type>
                    {
                        static const ::Wiz::Int::Type v_Value = 0;
                    };
                    template <>
                    struct Type<::Wiz::Bool::Type>
                    {
                        static const ::Wiz::Int::Type v_Value = 10;
                    };

                    template <>
                    struct Type<::Wiz::Int8::Type>
                    {
                        static const ::Wiz::Int::Type v_Value = 20;
                    };
                    template <>
                    struct Type<::Wiz::UInt8::Type>
                    {
                        static const ::Wiz::Int::Type v_Value = 30;
                    };
                    template <>
                    struct Type<::Wiz::WChar::Type>
                    {
                        static const ::Wiz::Int::Type v_Value = 40;
                    };

                    template <>
                    struct Type<::Wiz::Int16::Type>
                    {
                        static const ::Wiz::Int::Type v_Value = 50;
                    };
                    template <>
                    struct Type<::Wiz::UInt16::Type>
                    {
                        static const ::Wiz::Int::Type v_Value = 60;
                    };

                    template <>
                    struct Type<::Wiz::Int32::Type>
                    {
                        static const ::Wiz::Int::Type v_Value = 70;
                    };
                    template <>
                    struct Type<::Wiz::UInt32::Type> 
                    {
                        static const ::Wiz::Int::Type v_Value = 80;
                    };

                    template <>
                    struct Type<::Wiz::Int64::Type>
                    {
                        static const ::Wiz::Int::Type v_Value = 90;
                    };
                    template <>
                    struct Type<::Wiz::UInt64::Type>
                    {
                        static const ::Wiz::Int::Type v_Value = 100;
                    };
#if 0
                    template <>
                    struct Type<::Wiz::Int::Type>
                    {
#                       if (WIZ_CFG_INT_SIZE == 32)
                        static const ::Wiz::Int::Type v_Value = 70;
#                       elif (WIZ_CFG_INT_SIZE == 64)
                        static const ::Wiz::Int::Type v_Value = 90;
#                       endif /*WIZ_CFG_INT_SIZE*/
                    };

                    template <>
                    struct Type<::Wiz::UInt::Type>
                    {
#                       if (WIZ_CFG_INT_SIZE == 32)
                        static const ::Wiz::Int::Type v_Value = 80;
#                       elif (WIZ_CFG_INT_SIZE == 64)
                        static const ::Wiz::Int::Type v_Value = 100;
#                       endif /*WIZ_CFG_INT_SIZE*/
                    };
#endif
                    template <>
                    struct Type<::Wiz::Real32::Type>
                    {
                        static const ::Wiz::Int::Type v_Value = 130;
                    };
                    template <>
                    struct Type<::Wiz::Real64::Type>
                    {
                        static const ::Wiz::Int::Type v_Value = 140;
                    };
#if 0
                    template <>
                    struct Type<::Wiz::Real::Type>
                    {
#                       if (WIZ_CFG_REAL_SIZE == 32)
                        static const ::Wiz::Int::Type v_Value = 130;
#                       elif (WIZ_CFG_REAL_SIZE == 64)
                        static const ::Wiz::Int::Type v_Value = 140;
#                       endif /*WIZ_CFG_REAL_SIZE*/
                    };
#endif

                    template <typename T>
                    struct Type<T*>
                    {
                        static const ::Wiz::Int::Type v_Value = 160;
                    };

                    template <typename T>
                    struct Type<T* const>
                    {
                        static const ::Wiz::Int::Type v_Value = 160;
                    };

                    template <typename T, int N>
                    struct Type<T[N]>
                    {
                        static const ::Wiz::Int::Type v_Value = 160;
                    };

                    template <typename T0, typename T1>
                    struct Higher
                    {
                        static const ::Wiz::Bool::Type TOGtT1 = ::Wiz::BNF::Actor::Operators::Rank::Type<T0>::v_Value > ::Wiz::BNF::Actor::Operators::Rank::Type<T1>::v_Value;
                        typedef typename ::Wiz::TypeTraits::If<TOGtT1, T0, T1>::tType tType;
                    };
                } /// end of namespace Rank
            } /// end of namespace Operators
        } /// end of namespace Actor
    } /// end of namespace BNF
} /// end of namespace Wiz

#endif /*__WIZ_BNF_ACTOR_OPERATORS_RANK_HPP__SHANHAOBO_19800429__*/
